package com.jzy.common.constant;

import lombok.Getter;

/**
 * @author jzy
 * @date 2020/9/9 13:36
 */
public class WareConstant {

    public static final String STOCK_EVENT_EXCHANGE = "stock-event-exchange";

    public static final String STOCK_CREAT_ROUTING_KEY = "stock.create.stock";

    //采购单
    public enum PurchaseStatusEnum {
        //状态[0新建，1已分配，2正在采购，3已完成，4采购失败]
        CREAT(0, "新建"),
        ASSIGNED(1, "已分配"),
        RECEIVE(2, "已领取"),
        FINISH(3, "已完成"),
        HASERROR(4, "有异常");
        @Getter
        private int code;
        @Getter
        private String message;

        PurchaseStatusEnum(int code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    //采购需求
    public enum PurchaseDetailStatusEnum {
        //状态[0新建，1已分配，2正在采购，3已完成，4采购失败]
        CREAT(0, "新建"),
        ASSIGNED(1, "已分配"),
        BUYING(2, "正在采购"),
        FINISH(3, "已完成"),
        FAIL(4, "采购失败");
        @Getter
        private int code;
        @Getter
        private String message;

        PurchaseDetailStatusEnum(int code, String message) {
            this.code = code;
            this.message = message;
        }
    }


    //库存锁定状态
    public enum WareLockStatusEnum {
        //状态[0新建，1已分配，2正在采购，3已完成，4采购失败]
        LOCK(1, "已锁定"),
        UNLOCK(2, "已解锁"),
        BUYING(3, "扣减");
        @Getter
        private int code;
        @Getter
        private String message;

        WareLockStatusEnum(int code, String message) {
            this.code = code;
            this.message = message;
        }
    }
}
